/**
 * Copyright (C) T-Systems International, 2013-2014
 *
 * The copyright of the computer program herein is the property of
 * T-Systems International. The program may be used and/or copied
 * only with the written permission of T-Systems International or in
 * accordance with the terms and conditions stipulated in the
 * agreement/contract under which the program has been supplied.
 *
 * $Author$
 * $Date$
 * $Rev$
 */
package com.tsystems.migdb.utils;

import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang.builder.StandardToStringStyle;
import org.apache.commons.lang.builder.ToStringBuilder;

public class MigdbToStringBuilder {

    public static String toString(Object o) {
        StandardToStringStyle style = new StandardToStringStyle();
        style.setUseShortClassName(true);
        style.setContentStart("{");
        style.setFieldSeparator(SystemUtils.LINE_SEPARATOR + "\t");
        style.setFieldSeparatorAtStart(true);
        style.setFieldNameValueSeparator(": ");
        style.setContentEnd(SystemUtils.LINE_SEPARATOR + "}");
        return ToStringBuilder.reflectionToString(o, style);
    }

}